home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / gauge / carvb25 / cframes.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-01-18  |  14.6 KB  |  453 lines

  1. VERSION 2.00
  2. Begin Form FrameDemo 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Frame & Background Demo"
  6.    ClientHeight    =   4830
  7.    ClientLeft      =   1500
  8.    ClientTop       =   1455
  9.    ClientWidth     =   6675
  10.    Height          =   5235
  11.    Left            =   1440
  12.    LinkTopic       =   "Form2"
  13.    MaxButton       =   0   'False
  14.    MDIChild        =   -1  'True
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   4830
  17.    ScaleWidth      =   6675
  18.    Top             =   1110
  19.    Width           =   6795
  20.    Begin CAR Car1 
  21.       AutoRedraw      =   -1  'True
  22.       AVersion        =   2.5
  23.       BackgroundColor =   &H00FFFFFF&
  24.       BevelInner      =   1  ' 1 - Raised
  25.       BevelOuter      =   2  ' 2 - Inset
  26.       BevelWidth      =   2
  27.       BorderType      =   1  ' 1 - Bevel
  28.       BorderWidth     =   2
  29.       CaptionColor    =   &H00800000&
  30.       Danger          =   6
  31.       Delta           =   1
  32.       FrameColor      =   &H00404040&
  33.       FrameScaleX     =   1.1
  34.       FrameScaleY     =   1.1
  35.       FrameStyle      =   1  ' 1 - Circle
  36.       GaugeType       =   0  ' 0 - Tach
  37.       Height          =   3315
  38.       HubColor        =   &H00808080&
  39.       HubScale        =   0.15
  40.       Left            =   120
  41.       Max             =   10
  42.       Min             =   0
  43.       MouseControl    =   -1  'True
  44.       NeedleColor     =   &H00FF0000&
  45.       OutlineAlign    =   0  ' 0 - Left 
  46.       OutlineColor    =   &H00000000&
  47.       OutlineTitle    =   ""
  48.       OutlineWidth    =   0
  49.       ShowDanger      =   -1  'True
  50.       ShowWarning     =   -1  'True
  51.       TabIndex        =   29
  52.       TicColor        =   &H00000000&
  53.       Top             =   120
  54.       Value           =   0
  55.       Warning         =   5
  56.       Width           =   3675
  57.    End
  58.    Begin Frame Frame3 
  59.       BackColor       =   &H00C0C0C0&
  60.       Caption         =   "Frame Scaling Properties"
  61.       Height          =   1020
  62.       Left            =   2100
  63.       TabIndex        =   25
  64.       Top             =   3540
  65.       Width           =   4410
  66.       Begin HScrollBar HScroll1 
  67.          Height          =   240
  68.          Index           =   0
  69.          Left            =   1710
  70.          Max             =   140
  71.          TabIndex        =   27
  72.          Top             =   375
  73.          Width           =   2000
  74.       End
  75.       Begin HScrollBar HScroll1 
  76.          Height          =   240
  77.          Index           =   1
  78.          Left            =   1710
  79.          Max             =   140
  80.          TabIndex        =   26
  81.          Top             =   615
  82.          Width           =   2000
  83.       End
  84.       Begin Label Label2 
  85.          AutoSize        =   -1  'True
  86.          BackStyle       =   0  'Transparent
  87.          Caption         =   "0"
  88.          Height          =   195
  89.          Index           =   0
  90.          Left            =   3825
  91.          TabIndex        =   0
  92.          Top             =   405
  93.          Width           =   120
  94.       End
  95.       Begin Label Label1 
  96.          Alignment       =   1  'Right Justify
  97.          AutoSize        =   -1  'True
  98.          BackStyle       =   0  'Transparent
  99.          Caption         =   "FrameScaleX:"
  100.          FontBold        =   0   'False
  101.          FontItalic      =   0   'False
  102.          FontName        =   "MS Sans Serif"
  103.          FontSize        =   8.25
  104.          FontStrikethru  =   0   'False
  105.          FontUnderline   =   0   'False
  106.          Height          =   195
  107.          Index           =   0
  108.          Left            =   630
  109.          TabIndex        =   1
  110.          Top             =   390
  111.          Width           =   990
  112.       End
  113.       Begin Label Label1 
  114.          Alignment       =   1  'Right Justify
  115.          AutoSize        =   -1  'True
  116.          BackStyle       =   0  'Transparent
  117.          Caption         =   "FrameScaleY:"
  118.          FontBold        =   0   'False
  119.          FontItalic      =   0   'False
  120.          FontName        =   "MS Sans Serif"
  121.          FontSize        =   8.25
  122.          FontStrikethru  =   0   'False
  123.          FontUnderline   =   0   'False
  124.          Height          =   195
  125.          Index           =   1
  126.          Left            =   630
  127.          TabIndex        =   2
  128.          Top             =   645
  129.          Width           =   990
  130.       End
  131.       Begin Label Label2 
  132.          AutoSize        =   -1  'True
  133.          BackStyle       =   0  'Transparent
  134.          Caption         =   "0"
  135.          Height          =   195
  136.          Index           =   1
  137.          Left            =   3825
  138.          TabIndex        =   28
  139.          Top             =   645
  140.          Width           =   120
  141.       End
  142.    End
  143.    Begin Frame Frame1 
  144.       BackColor       =   &H00C0C0C0&
  145.       Caption         =   "Picture Properties"
  146.       Height          =   1755
  147.       Left            =   3960
  148.       TabIndex        =   14
  149.       Top             =   1680
  150.       Width           =   2535
  151.       Begin OptionButton Option1 
  152.          BackColor       =   &H00C0C0C0&
  153.          Caption         =   "FramePicture"
  154.          FontBold        =   0   'False
  155.          FontItalic      =   0   'False
  156.          FontName        =   "MS Sans Serif"
  157.          FontSize        =   8.25
  158.          FontStrikethru  =   0   'False
  159.          FontUnderline   =   0   'False
  160.          Height          =   225
  161.          Index           =   0
  162.          Left            =   90
  163.          TabIndex        =   4
  164.          Top             =   330
  165.          Value           =   -1  'True
  166.          Width           =   2100
  167.       End
  168.       Begin OptionButton Option1 
  169.          BackColor       =   &H00C0C0C0&
  170.          Caption         =   "BackgroundPicture"
  171.          FontBold        =   0   'False
  172.          FontItalic      =   0   'False
  173.          FontName        =   "MS Sans Serif"
  174.          FontSize        =   8.25
  175.          FontStrikethru  =   0   'False
  176.          FontUnderline   =   0   'False
  177.          Height          =   225
  178.          Index           =   1
  179.          Left            =   90
  180.          TabIndex        =   5
  181.          Top             =   570
  182.          Width           =   2100
  183.       End
  184.       Begin PictureBox Image1 
  185.          Height          =   645
  186.          Index           =   4
  187.          Left            =   1245
  188.          Picture         =   CFRAMES.FRX:0000
  189.          ScaleHeight     =   41
  190.          ScaleMode       =   3  'Pixel
  191.          ScaleWidth      =   41
  192.          TabIndex        =   6
  193.          Top             =   990
  194.          Width           =   645
  195.       End
  196.       Begin PictureBox Image1 
  197.          Height          =   645
  198.          Index           =   2
  199.          Left            =   585
  200.          Picture         =   CFRAMES.FRX:463A
  201.          ScaleHeight     =   41
  202.          ScaleMode       =   3  'Pixel
  203.          ScaleWidth      =   41
  204.          TabIndex        =   7
  205.          Top             =   990
  206.          Width           =   645
  207.       End
  208.    End
  209.    Begin Frame Frame4 
  210.       BackColor       =   &H00C0C0C0&
  211.       Caption         =   "Color Properties"
  212.       Height          =   1410
  213.       Left            =   3960
  214.       TabIndex        =   19
  215.       Top             =   240
  216.       Width           =   2535
  217.       Begin OptionButton Option3 
  218.          BackColor       =   &H00C0C0C0&
  219.          Caption         =   "BackgroundColor"
  220.          FontBold        =   0   'False
  221.          FontItalic      =   0   'False
  222.          FontName        =   "MS Sans Serif"
  223.          FontSize        =   8.25
  224.          FontStrikethru  =   0   'False
  225.          FontUnderline   =   0   'False
  226.          Height          =   195
  227.          Index           =   1
  228.          Left            =   90
  229.          TabIndex        =   8
  230.          Top             =   570
  231.          Width           =   1600
  232.       End
  233.       Begin OptionButton Option3 
  234.          BackColor       =   &H00C0C0C0&
  235.          Caption         =   "FrameColor"
  236.          FontBold        =   0   'False
  237.          FontItalic      =   0   'False
  238.          FontName        =   "MS Sans Serif"
  239.          FontSize        =   8.25
  240.          FontStrikethru  =   0   'False
  241.          FontUnderline   =   0   'False
  242.          Height          =   195
  243.          Index           =   0
  244.          Left            =   90
  245.          TabIndex        =   9
  246.          Top             =   330
  247.          Value           =   -1  'True
  248.          Width           =   1600
  249.       End
  250.       Begin Label HColors 
  251.          BackColor       =   &H00808000&
  252.          Height          =   225
  253.          Index           =   9
  254.          Left            =   2190
  255.          TabIndex        =   24
  256.          Top             =   945
  257.          Width           =   225
  258.       End
  259.       Begin Label HColors 
  260.          BackColor       =   &H000080FF&
  261.          Height          =   225
  262.          Index           =   4
  263.          Left            =   1035
  264.          TabIndex        =   10
  265.          Top             =   945
  266.          Width           =   225
  267.       End
  268.       Begin Label HColors 
  269.          BackColor       =   &H00000000&
  270.          Height          =   225
  271.          Index           =   0
  272.          Left            =   120
  273.          TabIndex        =   15
  274.          Top             =   945
  275.          Width           =   225
  276.       End
  277.       Begin Label HColors 
  278.          BackColor       =   &H00808080&
  279.          Height          =   225
  280.          Index           =   5
  281.          Left            =   1275
  282.          TabIndex        =   16
  283.          Top             =   945
  284.          Width           =   225
  285.       End
  286.       Begin Label HColors 
  287.          BackColor       =   &H00FFFFFF&
  288.          Height          =   225
  289.          Index           =   1
  290.          Left            =   345
  291.          TabIndex        =   17
  292.          Top             =   945
  293.          Width           =   225
  294.       End
  295.       Begin Label HColors 
  296.          BackColor       =   &H000000FF&
  297.          Height          =   225
  298.          Index           =   6
  299.          Left            =   1500
  300.          TabIndex        =   18
  301.          Top             =   945
  302.          Width           =   225
  303.       End
  304.       Begin Label HColors 
  305.          BackColor       =   &H0000FF00&
  306.          Height          =   225
  307.          Index           =   2
  308.          Left            =   585
  309.          TabIndex        =   23
  310.          Top             =   945
  311.          Width           =   225
  312.       End
  313.       Begin Label HColors 
  314.          BackColor       =   &H0000FFFF&
  315.          Height          =   225
  316.          Index           =   7
  317.          Left            =   1740
  318.          TabIndex        =   22
  319.          Top             =   945
  320.          Width           =   225
  321.       End
  322.       Begin Label HColors 
  323.          BackColor       =   &H00FF0000&
  324.          Height          =   225
  325.          Index           =   3
  326.          Left            =   810
  327.          TabIndex        =   21
  328.          Top             =   945
  329.          Width           =   225
  330.       End
  331.       Begin Label HColors 
  332.          BackColor       =   &H00FF00FF&
  333.          Height          =   225
  334.          Index           =   8
  335.          Left            =   1965
  336.          TabIndex        =   20
  337.          Top             =   945
  338.          Width           =   225
  339.       End
  340.    End
  341.    Begin Frame Frame2 
  342.       BackColor       =   &H00C0C0C0&
  343.       Caption         =   "FrameStyle"
  344.       Height          =   1020
  345.       Left            =   420
  346.       TabIndex        =   11
  347.       Top             =   3540
  348.       Width           =   1515
  349.       Begin OptionButton Option2 
  350.          BackColor       =   &H00C0C0C0&
  351.          Caption         =   "Rectangle"
  352.          FontBold        =   0   'False
  353.          FontItalic      =   0   'False
  354.          FontName        =   "MS Sans Serif"
  355.          FontSize        =   8.25
  356.          FontStrikethru  =   0   'False
  357.          FontUnderline   =   0   'False
  358.          Height          =   225
  359.          Index           =   2
  360.          Left            =   270
  361.          TabIndex        =   3
  362.          Top             =   705
  363.          Width           =   1100
  364.       End
  365.       Begin OptionButton Option2 
  366.          BackColor       =   &H00C0C0C0&
  367.          Caption         =   "Circle"
  368.          FontBold        =   0   'False
  369.          FontItalic      =   0   'False
  370.          FontName        =   "MS Sans Serif"
  371.          FontSize        =   8.25
  372.          FontStrikethru  =   0   'False
  373.          FontUnderline   =   0   'False
  374.          Height          =   225
  375.          Index           =   1
  376.          Left            =   270
  377.          TabIndex        =   13
  378.          Top             =   495
  379.          Width           =   1095
  380.       End
  381.       Begin OptionButton Option2 
  382.          BackColor       =   &H00C0C0C0&
  383.          Caption         =   "None"
  384.          FontBold        =   0   'False
  385.          FontItalic      =   0   'False
  386.          FontName        =   "MS Sans Serif"
  387.          FontSize        =   8.25
  388.          FontStrikethru  =   0   'False
  389.          FontUnderline   =   0   'False
  390.          Height          =   225
  391.          Index           =   0
  392.          Left            =   270
  393.          TabIndex        =   12
  394.          Top             =   270
  395.          Width           =   1125
  396.       End
  397.    End
  398. Dim numsecs As Integer
  399. Sub Form_Load ()
  400.     hscroll1(0) = car1.FrameScaleX * 100
  401.     hscroll1(1) = car1.FrameScaleY * 100
  402.     option2(car1.FrameStyle) = True
  403.     numsecs = 0
  404. End Sub
  405. Sub HColors_Click (index As Integer)
  406.     If option3(0) Then
  407.         car1.FrameColor = hcolors(index).BackColor
  408.         car1.FramePicture = LoadPicture("")
  409.     Else
  410.         car1.BackgroundColor = hcolors(index).BackColor
  411.         car1.BackgroundPicture = LoadPicture("")
  412.     End If
  413. End Sub
  414. Sub HScroll1_Change (index As Integer)
  415.     Select Case index
  416.         Case 0
  417.             car1.FrameScaleX = hscroll1(0) / 100
  418.             label2(0) = hscroll1(0) / 100
  419.         Case 1
  420.             car1.FrameScaleY = hscroll1(1) / 100
  421.             label2(1) = hscroll1(1) / 100
  422.     End Select
  423. End Sub
  424. Sub HScroll1_Scroll (index As Integer)
  425.     Select Case index
  426.         Case 0
  427.             car1.FrameScaleX = hscroll1(0) / 100
  428.             label2(0) = hscroll1(0) / 100
  429.         Case 1
  430.             car1.FrameScaleY = hscroll1(1) / 100
  431.             label2(1) = hscroll1(1) / 100
  432.     End Select
  433. End Sub
  434. Sub Image1_Click (index As Integer)
  435.     If option1(0) Then
  436.         car1.FramePicture = Image1(index).Picture
  437.     Else
  438.         car1.BackgroundPicture = Image1(index).Picture
  439.     End If
  440. End Sub
  441. Sub Option2_Click (index As Integer)
  442.     car1.FrameStyle = index
  443.     If index = 1 Then
  444.         label1(1).Visible = False
  445.         hscroll1(1).Visible = False
  446.         label2(1).Visible = False
  447.     Else
  448.         label1(1).Visible = True
  449.         hscroll1(1).Visible = True
  450.         label2(1).Visible = True
  451.     End If
  452. End Sub
  453.